#ifndef _DATE_H
#define _DATE_H

#include "Event.h"
#include "Additional.h"

#include <string>
#include <vector>
#include <sstream>
#include <cassert>
#include <ctime>

using namespace std;

class Date
{
public:
	Date();
	Date(int, int, int);

	int getDay();
	void setDay(int);

	int getMonth();
	void setMonth(int);

	int getYear();
	void setYear(int);

	Event getEvent(int);
	vector<Event> getEventList();

	int getEventListLength();
	bool isLeap();

	void addEvent(string id, string name, string time, string location, Time, Time, string, string);
	void markEventAsDone(int markIndex);
	void Date::markEventAsNotDone(int markIndex);
	int dateDifference(Date);
	void deleteEvent(int);
	void editEvent(int editIndex, Task currentTask,Time,Time);
	void incrementDays(int noOfDays);
	void decrementDays(int noOfDays);
	int getIndex(string);
	int compareDates(Date obj);
	string getLargestId();

	Date dateStringToObject(string date);
	string getEventDetails (int index);
	bool isValidDate(Date date);
	string getConvertedDate(string tempDate);
	
	~Date(void);
	
private:
	int day;
	int month;
	int year;
	vector<Event> eventList;
	
	int getCurrentDayIndex();
	bool equalsIgnoreCase(string str1, string str2);
	vector<string> removeSlash(string date);
	vector<string> tokenize(string inputDate);
	bool hasSlashes(string date);
	int whichMonth(string month);
	string toLower(string );
	bool isMonth(string month);
	Date setDateObject(int day, int month, int year);
	
};

#endif